package study.myself.exception;

import java.util.Scanner;

import org.junit.Test;

/**
* @Name: Student
* @Description: 自定义异常测试类——学生调用分数校验方法，检查分数是否正确：如果不正确，则抛出自定义异常；
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-14 下午8:05:18 
* @Version: V1.0
 */
public class Student {
	
	@Test
	public void testSocre() {
		Scanner sc = new Scanner(System.in) ;
		System.out.println("请输入学生成绩：");
		int score = sc.nextInt() ;
		Teacher t = new Teacher() ;
		try {
			t.check(score) ;
		} catch (MyException e) {
			e.printStackTrace();
		} finally {
			t = null ;
		}
	}

}
